# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=log4cpp
pkgver=1.1.4
pkgrel=3
pkgdesc='A library of C++ classes for flexible logging to files, syslog, IDSA and other destinations.'
arch=('x86_64' 'aarch64')
url='http://log4cpp.sourceforge.net/'
license=('LGPL')
depends=('gcc-libs' 'libnsl')
source=("https://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz")
sha512sums=('0cdbd46ccd048d70bea3c35d22080dc5dd21fc3b9c415fe464847e60775954f57e9c8344506f0f94f16e90e8bdaa9cc6d84d3aa65191501e52ee8dfc639f0398')

build() {
  cd $pkgname

  if [[ "$CARCH" == "i686" || "$CARCH" == "x86_64" ]];
  then
    ./configure \
      --prefix=/usr \
      --disable-doxygen \
      --disable-dot \
      --without-idsa
  else
    ./configure --build=arm \
      --prefix=/usr \
      --disable-doxygen \
      --disable-dot \
      --without-idsa
  fi

  make
}

package() {
  cd $pkgname

  make DESTDIR="$pkgdir" install
}

